<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="connexion.jsp"%>

<%
	String ch0 = "";
	ch0 = request.getParameter("model");
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>page de select</title>
<script type="text/javascript" src="ajax6.js"></script>
</head>
<body>

	<%
		Connection con = null;
		String URL = "jdbc:mysql://localhost:3306/" + ch0;
		con = DriverManager.getConnection(URL, "root", "metanote");
	%><table border="0">
		<%
			try {
				stmt = con.createStatement();
				ResultSet r = stmt.executeQuery("select * from contenus");
		%><h1>
			<%
				out.println("Contenus");
			%>
		</h1>
		<%
			while (r.next()) {
		%><tr>
			<td><input type="checkbox" name="t"
				value="<%out.println(r.getInt("id_contenu"));%>"></td>
			<td>
				<%
					out.println(r.getString("contenu"));
				%>
			</td>
		</tr>
		<%
			}
				r.close();
		%>
	</table>
	<%
		} catch (Exception e) {
			out.println("une exception " + e.getMessage());
		}
	%>
	<br>
	<br> type :
	<select name="s">
		<option value="1">Synonyme</option>

		<option value="2">Composition</option>
		<option value="3">Heritage</option>
		<option value="4">Proche</option>
	</select>
	<br>
	<br>
	<input type="button" name="relation" value="Valider ma relation"
		onClick="relcontenus()">
</body>
</html>